GPUPipeline
已编译的 GPU 渲染管线(着色器 + 固定功能状态)。
构造器
new
new(desc: {vertex: Shader, fragment: Shader?, vertexLayout:{VertexBufferLayout}, bindGroupLayouts:{GPUBindGroupLayout}?, colorTargets:{ColorTarget}?, depthStencil: DepthStencilState?, cullMode: CullMode?, topology: PrimitiveTopology?, sampleCount: number?,}) -> GPUPipeline
方法
getBindGroupLayout
getBindGroupLayout(groupIndex: number) -> GPUBindGroupLayout
返回管线为 @group(N) 自动派生的布局。如果在构造时提供了 bindGroupLayouts(重用显式布局)或 N 未被着色器绑定,则报错。镜像 WebGPU 的 pipeline.getBindGroupLayout(index)。